package com.github.wj.wx.company.servlet;

import com.github.wj.wx.company.util.AttestationUtil;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 微信企业号servlet认证
 * Created by IntelliJ IDEA.
 * user:wangj
 * date:2018/3/12
 * Time: 22:32
 */
public class CompanyServlet extends HttpServlet {

    private String token;

    private String aes_key;

    private String corp_id;


    public CompanyServlet(String token,String aes_key,String corp_id){
        this.token=token;
        this.aes_key=aes_key;
        this.corp_id=corp_id;
    }

    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        AttestationUtil.verify(req,resp, this.token,this.aes_key,this.corp_id);
    }

    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

    }
}
